{% if template == 'index' %}
    <link rel="canonical" href="https://{{ current_domain }}"/>
{% elsif template == 'collection_detail' %}
    <link rel="canonical" href="https://{{ current_domain }}/collections/{{ collection.handle }}"/>
{% elsif template == 'blog_detail' %}
    <link rel="canonical" href="https://{{ current_domain }}/blogs/{{ blog.handle }}"/>
{% elsif template == 'product_detail' %}
    <link rel="canonical" href="https://{{ current_domain }}/products/{{ product.handle }}"/>
{% elsif template == 'page_detail' %}
    <link rel="canonical" href="https://{{ current_domain }}/pages/{{ page.handle }}"/>
{% endif %}
